//package br.pucrio.inf.les.SPLAnalyser.impl.squidplugin.query;
//
//import java.util.List;
//
//import br.ufrn.dimap.ase.squid.core.facade.Query;
//import br.ufrn.dimap.ase.squid.core.models.squidmodel.Asset;
//import br.ufrn.dimap.ase.squid.core.models.squidmodel.SquidModel;
//import br.ufrn.dimap.ase.squid.core.models.squidmodel.Mapping;
//import br.ufrn.dimap.ase.squid.core.models.util.SquidModelContent;
//import br.ufrn.dimap.ase.squid.core.models.util.ModelContent;
//
////Retorna todos as entidades que dependem de um determinado artefato.
//public class ImpactOfAChangeAsset implements Query {
//
//	public static final java.lang.Class CLAZZ = br.ufrn.dimap.ase.squid.core.models.squidmodel.Class.class;
//	public static final java.lang.Class FIELD = br.ufrn.dimap.ase.squid.core.models.squidmodel.Field.class;
//	public static final java.lang.Class METHOD = br.ufrn.dimap.ase.squid.core.models.squidmodel.Method.class;
//	private SquidModelContent analysisModelContent;
//	private ModelContent queryModelContent;
//	private SquidModel queryModel;
//	private java.lang.Class  classType;
//	private String name;
//	private String path;
//	
//	public ImpactOfAChangeAsset(String name, String path, java.lang.Class clazz){
//		this.name = name;
//		this.path = path;
//		this.classType = clazz;
//	}
//	
//	public SquidModel runQuery(SquidModel analysisModel) {
//		analysisModelContent = new SquidModelContent(analysisModel);
//		queryModelContent = new ModelContent();
//		query();
//		queryModel = queryModelContent.getAnalysisModel();
//		return queryModel;
//	}
//
//	private void query() {
//		Asset asset = null;
//		if(classType.equals(this.CLAZZ)){
//			asset = analysisModelContent.findClass(name, path);
//		}else if(classType.equals(this.FIELD)){
//			asset = analysisModelContent.findField(name, path);
//		}else if(classType.equals(this.METHOD)){
//			asset = analysisModelContent.findMethod(name, path);
//		}
//		Mapping mapping = analysisModelContent.findMappingOf(asset);
//		
//		queryModelContent.addFeature(mapping.getFeatures());
//		queryModelContent.addUseCase(mapping.getUseCases());
//		List<Asset> assets = analysisModelContent.getAssetsDependenciasOf(asset);
//		queryModelContent.addAsset(assets);
//	}
//
//	public String getName() {
//		return this.getClass().getSimpleName();
//	}
//
//}
